home *** CD-ROM | disk | FTP | other *** search
Wrap
;------------------------------------------------------------------------ ; ; Laplace Installation script ; ; $VER: Laplace-Install 1.2 (19.9.96) ; ; Script: (C)1996 by A Vision of Paradise ; Installer: (C)1996 ESCOM AG ; written by P!\K ; ;------------------------------------------------------------------------ ;-1- "language definitions" (if (= @language "deutsch") ( ;-1- "deutsch" (set #lhapath-prompt "Lha wird benötigt! Wo befindet es sich?") (set #lhapath-help (cat "Lha wird benötigt, um die Installation durchzuführen. " "Es wurde aber nicht im C: Verzeichnis gefunden!\n" "Es ist der vollständige Pfad anzugeben, an dem es zu finden ist.\n" "\n" @askfile-help ) ) (set #welcome "Willkommen bei der Installation von Laplace.") (set #mode-prompt "") (set #mode-help @askchoice-help) (set #modeupdate-prompt (cat "Welche Aktion willst Du ausführen?\n" "Laplace V%s ist bereits in %s installiert." ) ) (set #modeupdate-help @askchoice-help) (set #mode-update "Laplace aktualisieren") (set #mode-install "Laplace installieren") (set #mode-deinstall "Laplace löschen") (set #share-info (cat "Wenn Dir dieses Programm gefällt, schicke mir bitte eine e-Mail oder Postkarte.\n" "\n" "e-mail:\n" "bstegema@ix.urz.uni-heidelberg.de\n" "\n" "s-mail:\n" "Benjamin Stegemann\n" "Rohrbacher Str. 66\n" "69115 Heidelberg\n" "Germany" ) ) (set #wrongversion (cat "Dieses Skript benötigt den Installer V42.9 oder höher. " "Er befinded sich im Verzeichnis Laplace/Tools und sollte eigentlich benutzt werden. " "Falls Du ein Tool wie ToolAlias benutzt, kopiere diese Version als Deinen Standartinstaller. " ) ) (set #wrongos (cat "Laplace benötigt OS V39 oder besser.\n" "Du hast V%ld.%ld installiert. Sorry." ) ) (set #wrongmui (cat "Laplace benötigt MUI V13 oder besser.\n" "Du hast V%ld.%ld installiert. Sorry.\n\n" "MUI ist im Aminet erhältlich:\n" "dev/gui/muiXXusr.lha\n" "Wobei XX die Versionsnummer ist." ) ) (set #nomui (cat "Laplace benötigt MUI V13 oder besser.\n" "Zur Zeit ist MUI nicht installiert. Sorry.\n\n" "MUI ist im Aminet erhältlich:\n" "dev/gui/muiXXusr.lha\n" "Wobei XX die Versionsnummer ist." ) ) (set #wrongcpu (cat "Laplace benötigt mindestens einen MC68020 Prozessor.\n" "Du hast nur einen MC%s. Sorry." ) ) (set #destdir-prompt "Wähle das Verzeichnis, wo Laplace installiert werden soll. Eine neue Schublade wird erzeugt.") (set #destdir-help (cat "Eine Schublade 'Laplace' wird ein gewählten Verzeichnis erzeugt, wo alle nötigen Dateien gespeichert werden.\n\n" @askdir-help ) ) (set #icontype-prompt "Wähle die Piktogramm Kollektion aus:") (set #icontype-help @askchoice-help) (set #icontype-std "4 Farben Standart") (set #icontype-mwb "8 Farben MagicWB2") (set #lang-prompt "Welche Sprachen sollen installiert werden?") (set #langs-help @askoptions-help) (set #docs-prompt "In welchen Formaten soll die Dokumentation installiert werden?") (set #docs-help (cat "AmigaGuide:\n" " Dies sollte immer installiert werden, da die Online-Hilfe mit diesem Format arbeitet.\n\n" "ASCII:\n" " So kann die Dokumentation mit jedem Textanzeiger (z.B. MuchMore) angezeigt werden.\n\n" "DVI:\n" " So kann die Dokumentation in hoher Qualität ausgedruckt werden. Dazu ist jedoch eine TeX-Installation nötig.\n\n" @askoptions-help ) ) (set #unpack-main "Entpacke Hauptprogram...") (set #unpack-arexx "Entpacke ARexx Skripte...") (set #unpack-cat "Entpacke Kataloge...") (set #unpack-docs "Entpacke Dokumentation...") (set #unpack-fonts "Entpacke Schriftarten...") (set #unpack-libs "Entpacke Bibliotheken...") (set #unpack-include "Entpacke Include-Dateien...") (set #unpack-presets "Entpacke Einstellungen...") (set #unpack-projects "Entpacke Projekte...") (set #unpack-icons "Entpacke Piktogramme...") (set #unpack-tools "Entpacke Extras...") (set #unpack-error "Kann '%s' nicht entpacken.\nDOS Fehlerkode %ld.") (set #copy-icons "Kopiere Piktogramme...") (set #copy-more "Kopiere Dokumentanzeiger...") (set #deldir-prompt "Wähle das Verzeichnis, wo Laplace installiert ist.") (set #deldir-help @askdir-help) (set #deinstall-finish "Laplace wurde aus dem Verzeichnis '%s' gelöscht.\n\nSchade, daß Laplace Dir nicht gefallen hat ;-(") (set #deinstall-working "Laplace wird gelöscht...") (set #deinstall-notfound "Laplace befindet sich nicht im gewählten Verzeichnis.") (set #confirm-prompt (cat "Soll Laplace wirklich gelöscht werden?\n" "Die Daten gehen unwiederbringlich verloren!" ) ) (set #confirm-help @askbool-help) (set #parts-prompt "Welche Programmteile sollen installiert werden?") (set #parts-help (cat "Hauptprogramm:\n" " Laplace, was sonst...\n\n" "Dokumentation:\n" " Programmdokumentation in AmigaGuide und ASCII...\n\n" "Kataloge:\n" " Katalogdateien, um das Hauptprogramm an die gewählte Sprache anzupassen.\n\n" "Standartpiktogramme:\n" " Piktogramme für ARexx-Skripte, Include-Dateien und Projekte.\n\n" "Standartschriftarten:\n" " Du kannst eine eigene Schriftart einstellen, falls Du jedoch griechische Symbole nutzen willst, mußt Du diesen Teil installieren.\n\n" "Beispiel ARexx-Skripte:\n" " einige Beispiel-Skripte, die die Möglichkeiten der ARexx-Schnittstelle zeigen sollen.\n\n" "Include-Dateien:\n" " Bibliotheken mit externen Funktionen.\n\n" "Standarteinstellungen:\n" " einige Einstellungsdateien..\n\n" "Beipielprojekte:\n" " einige Projekte, die die Fähigkeiten von Laplace demonstrieren sollen.\n\n" "Extras:\n" " Ein paar Hilfsprogramme, u.a. ein Skript, um die DVI Anleitung auszudrucken.\n\n" @askoptions-help ) ) (set #parts-main "Hauptprogramm") (set #parts-docs "Dokumentaion") (set #parts-cats "Kataloge") (set #parts-icons "Standartpiktogramme") (set #parts-fonts "Standartschriftarten") (set #parts-arexx "Beipiels ARexx-Skripte") (set #parts-include "Include Dateien") (set #parts-presets "Standarteinstellungen") (set #parts-projects "Beispielprojekte") (set #parts-tools "Extras") (set #del-obsolete "Lösche veraltete Dateien...") ;-2- ) (if (= @language "pladd") ( (abort "not implemented") ) ( ;-1- "english" (set #lhapath-prompt "Lha is required! Where can I find it?") (set #lhapath-help (cat "Lha is needed to perform the installation, " "but I could not be found in your C: directory.\n" "Please enter the complete path, where I can find it.\n" "\n" @askfile-help ) ) (set #welcome "Welcome to the installation of Laplace.") (set #mode-prompt "Which action should be performed?") (set #mode-help @askchoice-help) (set #mode-install "install Laplace") (set #modeupdate-prompt (cat "Which action should be performed?\n" "Laplace V%s is already installed at %s." ) ) (set #modeupdate-help @askchoice-help) (set #mode-update "update Laplace") (set #mode-install "install Laplace") (set #mode-deinstall "remove Laplace") (set #share-info (cat "If you like this program, please send me a e-mail or postcard.\n" "\n" "e-mail:\n" "bstegema@ix.urz.uni-heidelberg.de\n" "\n" "s-mail:\n" "Benjamin Stegemann\n" "Rohrbacher Str. 66\n" "69115 Heidelberg\n" "Germany" ) ) (set #wrongversion (cat "This script need the installer V42.9 or better. " "It is provided in the Laplace/Tools directory and should be used. " "If you have a tool like ToolAlias installed, use this version as your standart." ) ) (set #wrongos (cat "Laplace requires OS V39 or better.\n" "You have V%ld.%ld installed. Sorry." ) ) (set #wrongmui (cat "Laplace requires MUI V13 or better.\n" "You have V%ld.%ld installed. Sorry.\n\n" "MUI can be found in Aminet:\n" "dev/gui/muiXXusr.lha\n" "where XX is the version number." ) ) (set #nomui (cat "Laplace requires MUI V13 or better.\n" "Currently MUI is not installed. Sorry.\n\n" "MUI can be found in Aminet:\n" "dev/gui/muiXXusr.lha\n" "where XX is the version number." ) ) (set #wrongcpu (cat "Laplace requires at least a MC68020 CPU.\n" "You have just a MC%s. Sorry." ) ) (set #destdir-prompt "Select the directory where Laplace should be installed. A new drawer will be created.") (set #destdir-help (cat "A drawer called 'Laplace' will be created in the selected directory, where all files are stored.\n\n" @askdir-help ) ) (set #icontype-prompt "Select the icon collection you want to use:") (set #icontype-help @askchoice-help) (set #icontype-std "4 color standart") (set #icontype-mwb "8 color MagicWB2") (set #langs-prompt "Which languages should be installed?") (set #langs-help @askoptions-help) (set #docs-prompt "Which formats for the documentation should be installed?") (set #docs-help (cat "AmigaGuide:\n" " You should always install this, because the online-help need this format.\n\n" "ASCII:\n" " With this format the documentation can be shown with every textdisplayer (e.g. MuchMore).\n\n" "DVI:\n" " You can use this to print the documentation in high quality. But you need a TeX-installation for this.\n\n" @askoptions-help ) ) (set #unpack-main "Decrunching main program...") (set #unpack-arexx "Decrunching ARexx scripts...") (set #unpack-cat "Decrunching catalogs...") (set #unpack-docs "Decrunching documentation...") (set #unpack-fonts "Decrunching fonts...") (set #unpack-libs "Decrunching libraries...") (set #unpack-include "Decrunching include files...") (set #unpack-presets "Decrunching presets...") (set #unpack-projects "Decrunching projects...") (set #unpack-icons "Decrunching icons...") (set #unpack-tools "Decrunching extras...") (set #unpack-error "Unable to unpack '%s'.\nDOS error code %ld.") (set #copy-icons "Copying icons...") (set #copy-more "Copying text viewer...") (set #deldir-prompt "Select the drawer where Laplace is installed.") (set #deldir-help @askdir-help) (set #deinstall-finish "Laplace has been removed from '%s'.\n\nToo bad that you didn't like Laplace ;-(") (set #deinstall-working "Laplace is being erased...") (set #deinstall-notfound "Laplace can't be found in the selected drawer.") (set #confirm-prompt (cat "Do you really want to remove Laplace?\n" "All files are lost forever!!" ) ) (set #confirm-help @askbool-help) (set #parts-prompt "Which packages should be installed?") (set #parts-help (cat "main program:\n" " Laplace itself...\n\n" "documentation:\n" " docs in AmigaGuide and ASCII...\n\n" "catalogs:\n" " catalogs to adjust the main program to the selected language.\n\n" "default icons:\n" " default icons for ARexx scripts, include files and projects.\n\n" "default fonts:\n" " you may use your own font, but if you want to have greek, symbols you must install this package.\n\n" "example ARexx scripts:\n" " some scripts to show the functions of the ARexx port.\n\n" "include files:\n" " libraries containing external functions.\n\n" "default presets:\n" " some preset files..\n\n" "example projects:\n" " some projects to demonstrate the abilities of Laplace.\n\n" "extras:\n" " some extra programs, among other things a script to print the DVI manual\n\n" @askoptions-help ) ) (set #parts-icons "default icons") (set #parts-main "main program") (set #parts-docs "documentation") (set #parts-cats "catalogs") (set #parts-fonts "default fonts") (set #parts-arexx "example ARexx scripts") (set #parts-include "include files") (set #parts-presets "default presets") (set #parts-projects "example projects") (set #parts-tools "extras") (set #del-obsolete "Deleting obsolete files...") ;-2- ) ) ) ;-2- ;-1- "P_UNPACK" (procedure P_UNPACK #unpack-msg #unpack-src #unpack-dest (working #unpack-msg) (if (> (run ("%s x \"%s\" \"%s\"" #lhapath #unpack-src #unpack-dest)) 0) (abort (#unpack-error #unpack-src #ioerr)) ) ) ;-2- ;-1- "P_COPYAS" (procedure P_COPYAS #copyas-src #copyas-dest #copyas-name (copyfiles (source #copyas-src) (dest #copyas-dest) (newname #copyas-name) (nogauge) ) ) ;-2- ;-1- "P_INSTALL" ;-1- "P_INSTALL_CHECK" (procedure P_INSTALL_CHECK ; We can't handle this script without Installer 42.9 or better! (if (< @installer-version 2752521) (abort #wrongversion) ) ; check OS (set #os-version (getversion)) (if (< #os-version 2555904) (abort (#wrongos (shiftright #os-version 16) (bitand #os-version 65535))) ) ; check MUI (if (exists "MUI:Libs/muimaster.library" (noreq)) (set #mui-version (getversion "MUI:Libs/muimaster.library")) (set #mui-version 0) ) (if (< #mui-version 851968) (abort (if (= #mui-version 0) #nomui (#wrongmui (shiftright #mui-version 16) (bitand #mui-version 65535)) ) ) ) ; check CPU (set #cpu-type (database "cpu")) (if (patmatch "(68000|68010)" #cpu-type) (abort (#wrongcpu #cpu-type)) ) ) ;-2- ;-1- "P_INSTALL_ASK" (procedure P_INSTALL_ASK ; get path for Lha (set #lhapath "c:Lha") (while (<> (exists #lhapath (noreq)) 1) ( (if (= @user-level 0) (abort "Since I don't know who to force the Installer to ask you for the path of Lha, I must ask you not to use the Novice mode..\n\nSorry for the inconvenience.") ) (set #lhapath (askfile (prompt #lhapath-prompt) (help #lhapath-help) (default #lhapath) ) ) ) ) ; get destination dir (set #dest (askdir (prompt #destdir-prompt) (help #destdir-help) (default @default-dest) ) ) (set @default-dest #dest) ; get icons type (set #icon-type (if (>= @user-level 2) (askchoice (prompt #icontype-prompt) (help #icontype-help) (choices #icontype-std #icontype-mwb) (default (if (= (getenv "MagicWB") "") 0 1 ) ) ) (if (= (getenv "MagicWB") "") 0 1 ) ) ) ; select parts (set #parts (if (>= @user-level 2) (askoptions (prompt #parts-prompt) (help #parts-help) (choices #parts-main #parts-docs #parts-cats #parts-icons #parts-fonts #parts-arexx #parts-include #parts-presets #parts-projects #parts-tools ) ) -1 ) ) (if (in #parts 1) ( ; get languages (set #langs (if (>= @user-level 2) (askoptions (prompt #langs-prompt) (help #langs-help) (choices "english" "deutsch") ) -1 ) ) ; get doc types (set #docs (if (>= @user-level 2) (askoptions (prompt #docs-prompt) (help #docs-help) (choices "AmigaGuide" "ASCII" "DVI") ) -1 ) ) ) ) ) ;-2- ;-1- "P_INSTALL_PERFORM" (procedure P_INSTALL_PERFORM (onerror ( (delete (tackon #dest "T:Laplace_temp") (all)) (delete (tackon #dest "Laplace") (all)) (delete (tackon #dest "Laplace.info")) ) ) ; delete obsolete files (working #del-obsolete) (delete (tackon #dest "Libs/avop.library")) (P_UNPACK #unpack-icons (select #icon-type "Data/Icons_std.lha" "Data/Icons_mwb.lha" ) "T:Laplace_temp/" ) (makedir (tackon #dest "Laplace")) (makedir (tackon #dest "Laplace/c")) (makedir (tackon #dest "Laplace/ARexx")) (makedir (tackon #dest "Laplace/Catalogs")) (makedir (tackon #dest "Laplace/Docs")) (makedir (tackon #dest "Laplace/Fonts")) (makedir (tackon #dest "Laplace/Icons")) (makedir (tackon #dest "Laplace/Include")) (makedir (tackon #dest "Laplace/Libs")) (makedir (tackon #dest "Laplace/Presets")) (makedir (tackon #dest "Laplace/Projects")) (makedir (tackon #dest "Laplace/Tools")) (working #copy-icons) (copyfiles (source "T:Laplace_temp/Drawer1.info") (dest #dest) (newname "Laplace.info") (nogauge) ) (copyfiles (source "T:Laplace_temp/") (pattern "~(def_#?.info|Drawer?.info)") (dest (tackon #dest "Laplace")) (nogauge) ) (working #copy-more) (copyfiles (source "Tools/MuchMore") (dest (tackon #dest "Laplace/c")) (nogauge) ) ; main part (if (in #parts 0) ( (P_UNPACK #unpack-main "Data/Main.lha" (tackon #dest "Laplace/")) (P_UNPACK #unpack-libs "Data/Libs.lha" (tackon #dest "Laplace/Libs/")) ) ) ; docs (if (in #parts 1) ( (P_UNPACK #unpack-docs "Data/Docs.lha" (tackon #dest "Laplace/Docs/")) (working #copy-icons) (copyfiles (source "T:Laplace_temp/Docs/") (pattern "(History|Readme.mui).info") (dest (tackon #dest "Laplace/Docs")) (nogauge) ) (if (in #langs 0) ( (makedir (tackon #dest "Laplace/Docs/english")) (copyfiles (source "Data/Docs_english_files") (dest (tackon #dest "Laplace/Docs/english")) (newname "Files") (noposition) (nogauge) ) (working #copy-icons) (copyfiles (source "T:Laplace_temp/Drawer2.info") (dest (tackon #dest "Laplace/Docs")) (newname "english.info") (noposition) (nogauge) ) (if (in #docs 0) ( (P_UNPACK #unpack-docs "Data/Docs_english_guide.lha" (tackon #dest "Laplace/Docs/english/")) (working #copy-icons) (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.info" (tackon #dest "Laplace/Docs/english") "ARexx.info") (P_COPYAS "T:Laplace_temp/Docs/english/Functions.info" (tackon #dest "Laplace/Docs/english") "Functions.info") (P_COPYAS "T:Laplace_temp/Docs/english/Manual.info" (tackon #dest "Laplace/Docs/english") "Manual.info") ) ) (if (in #docs 1) ( (P_UNPACK #unpack-docs "Data/Docs_english_doc.lha" (tackon #dest "Laplace/Docs/english/")) (working #copy-icons) (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.doc.info" (tackon #dest "Laplace/Docs/english") "ARexx.doc.info") (P_COPYAS "T:Laplace_temp/Docs/english/Functions.doc.info" (tackon #dest "Laplace/Docs/english") "Functions.doc.info") (P_COPYAS "T:Laplace_temp/Docs/english/Manual.doc.info" (tackon #dest "Laplace/Docs/english") "Manual.doc.info") ) ) (if (in #docs 2) ( (P_UNPACK #unpack-docs "Data/Docs_english_dvi.lha" (tackon #dest "Laplace/Docs/english/")) (working #copy-icons) (P_COPYAS "T:Laplace_temp/Docs/english/Manual.dvi.info" (tackon #dest "Laplace/Docs/english") "Manual.dvi.info") ) ) ) ) (if (in #langs 1) ( (makedir (tackon #dest "Laplace/Docs/deutsch")) (copyfiles (source "Data/Docs_deutsch_files") (dest (tackon #dest "Laplace/Docs/deutsch")) (newname "Files") (noposition) (nogauge) ) (working #copy-icons) (copyfiles (source "T:Laplace_temp/Drawer2.info") (dest (tackon #dest "Laplace/Docs")) (newname "deutsch.info") (noposition) (nogauge) ) (if (in #docs 0) ( (P_UNPACK #unpack-docs "Data/Docs_deutsch_guide.lha" (tackon #dest "Laplace/Docs/deutsch/")) (working #copy-icons) (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.info" (tackon #dest "Laplace/Docs/deutsch") "ARexx.info") (P_COPYAS "T:Laplace_temp/Docs/english/Functions.info" (tackon #dest "Laplace/Docs/deutsch") "Funktionen.info") (P_COPYAS "T:Laplace_temp/Docs/english/Manual.info" (tackon #dest "Laplace/Docs/deutsch") "Anleitung.info") ) ) (if (in #docs 1) ( (P_UNPACK #unpack-docs "Data/Docs_deutsch_doc.lha" (tackon #dest "Laplace/Docs/deutsch/")) (working #copy-icons) (P_COPYAS "T:Laplace_temp/Docs/english/ARexx.doc.info" (tackon #dest "Laplace/Docs/deutsch") "ARexx.doc.info") (P_COPYAS "T:Laplace_temp/Docs/english/Functions.doc.info" (tackon #dest "Laplace/Docs/deutsch") "Funktionen.doc.info") (P_COPYAS "T:Laplace_temp/Docs/english/Manual.doc.info" (tackon #dest "Laplace/Docs/deutsch") "Anleitung.doc.info") ) ) (if (in #docs 2) ( (P_UNPACK #unpack-docs "Data/Docs_deutsch_dvi.lha" (tackon #dest "Laplace/Docs/deutsch/")) (working #copy-icons) (P_COPYAS "T:Laplace_temp/Docs/english/Manual.dvi.info" (tackon #dest "Laplace/Docs/deutsch") "Anleitung.dvi.info") ) ) ) ) ) ) ; catalogs (if (in #parts 2) ( (if (in #langs 1) ( (makedir (tackon #dest "Laplace/Catalogs/deutsch")) (P_UNPACK #unpack-cat "Data/Catalogs_deutsch.lha" (tackon #dest "Laplace/Catalogs/deutsch/")) ) ) ) ) ; icons (if (in #parts 3) (copyfiles (source "T:Laplace_temp/") (pattern "def_#?.info") (dest (tackon #dest "Laplace/Icons")) (nogauge) ) ) ; fonts (if (in #parts 4) (P_UNPACK #unpack-fonts "Data/Fonts.lha" (tackon #dest "Laplace/Fonts/")) ) ; arexx scripts (if (in #parts 5) ( (P_UNPACK #unpack-arexx "Data/ARexx.lha" (tackon #dest "Laplace/ARexx/")) (working #copy-icons) (foreach (tackon #dest "Laplace/ARexx") "#?" (copyfiles (source "T:Laplace_temp/def_ARexx.info") (dest (tackon #dest "Laplace/ARexx")) (newname (cat @each-name ".info")) (noposition) (nogauge) ) ) ) ) ; include (if (in #parts 6) ( (P_UNPACK #unpack-include "Data/Include.lha" (tackon #dest "Laplace/Include/")) (working #copy-icons) (foreach (tackon #dest "Laplace/Include") "#?" (copyfiles (source "T:Laplace_temp/def_Include.info") (dest (tackon #dest "Laplace/Include")) (newname (cat @each-name ".info")) (noposition) (nogauge) ) ) ) ) ; presets (if (in #parts 7) ( (P_UNPACK #unpack-presets "Data/Presets.lha" (tackon #dest "Laplace/Presets/")) (working #copy-icons) (foreach (tackon #dest "Laplace/Presets") "#?" (copyfiles (source "T:Laplace_temp/def_Preset.info") (dest (tackon #dest "Laplace/Presets")) (newname (cat @each-name ".info")) (noposition) (nogauge) ) ) ) ) ; projects (if (in #parts 8) ( (P_UNPACK #unpack-projects "Data/Projects.lha" (tackon #dest "Laplace/Projects/")) (working #copy-icons) (foreach (tackon #dest "Laplace/Projects") "#?" (copyfiles (source "T:Laplace_temp/def_Project.info") (dest (tackon #dest "Laplace/Projects")) (newname (cat @each-name ".info")) (noposition) (nogauge) ) ) ) ) ; tools (if (in #parts 9) ( (P_UNPACK #unpack-tools "Data/Tools.lha" (tackon #dest "Laplace/Tools/")) (working #copy-icons) (copyfiles (source "T:Laplace_temp/Tools/PrintManual.info") (dest (tackon #dest "Laplace/Tools/")) (noposition) (nogauge) ) ) ) (delete "T:Laplace_temp" (all)) ) ;-2- (procedure P_INSTALL (message #share-info (all)) (set @user-level #defuser-level) (welcome #welcome) (P_INSTALL_CHECK) (P_INSTALL_ASK) (P_INSTALL_PERFORM) (run ("Tools/SetConfig PATH=\"%s\" VERSION=0.7" @default-dest)) ; Finito (complete 100) (exit) ) ;-2- ;-1- "P_REMOVE" (procedure P_REMOVE ; get destination dir (set #dest (askdir (prompt #deldir-prompt) (help #deldir-help) (default @default-dest) ) ) (if (= (substr #dest (- (strlen #dest) 8)) "/Laplace") (set #dest (substr #dest 0 (- (strlen #dest) 8))) ) (if (= (substr #dest (- (strlen #dest) 9)) "/Laplace/") (set #dest (substr #dest 0 (- (strlen #dest) 9))) ) (if (= (exists (tackon #dest "Laplace") (noreq)) 2) (if (= (askbool (prompt #confirm-prompt) (help #confirm-help) ) 1 ) ( (working #deinstall-working) (delete (tackon #dest "Laplace") (all)) (delete (tackon #dest "Laplace.info")) (delete "ENVARC:Laplace") (delete "ENV:Laplace") (message (#deinstall-finish #dest)) ) ) (message #deinstall-notfound) ) (exit (quiet)) ) ;-2- ;-1- "main menu" (complete 0) (if (exists "ENVARC:Laplace") ( (run "Tools/GetConfig >ENV:Laplace_Version VERSION") (run "Tools/GetConfig >ENV:Laplace_Path PATH") (set @default-dest (getenv "Laplace_Path")) (set #old-version (getenv "Laplace_Version")) (set #defuser-level 0) (select (askchoice (prompt (#modeupdate-prompt #old-version @default-dest)) (help #modeupdate-help) (choices #mode-update #mode-deinstall) (default 0) ) (P_INSTALL) (P_REMOVE) ) ) ( (set #defuser-level 1) (select (askchoice (prompt #mode-prompt) (help #mode-help) (choices #mode-install #mode-deinstall) (default 0) ) (P_INSTALL) (P_REMOVE) ) ) ) ;-2-